package com.filetransfer.utils;
import java.io.File;
import java.io.InputStream;

import cn.hutool.crypto.digest.DigestUtil;
public class MD5 {
    public static String calcFile(File file) {
        return DigestUtil.md5Hex(file);
    }
    public static String calcFile(InputStream fs) {
        return DigestUtil.md5Hex(fs);
    }
    public static String calcBytes(byte[] chunkData) {
        return DigestUtil.md5Hex(chunkData);
    }
}
